home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1995 August: Tool Chest / Dev.CD Aug 95 TC / Dev.CD Aug 95 TC.toast / Tool Chest / Development Tools & Languages / Dylan Related / Marlais / Marlais 0.5.9-portable sources / class.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-03-15  |  2.5 KB  |  72 lines  |  [TEXT/ttxt]

  1. /*
  2.  
  3.    class.h
  4.  
  5.    This software is free software; you can redistribute it and/or
  6.    modify it under the terms of the GNU Library General Public
  7.    License as published by the Free Software Foundation; either
  8.    version 2 of the License, or (at your option) any later version.
  9.  
  10.    This software is distributed in the hope that it will be useful,
  11.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  12.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  13.    Library General Public License for more details.
  14.  
  15.    You should have received a copy of the GNU Library General Public
  16.    License along with this software; if not, write to the Free
  17.    Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  18.  
  19.    Original copyright notice follows:
  20.  
  21.    Copyright, 1993, Brent Benson.  All Rights Reserved.
  22.    0.4 & 0.5 Revisions Copyright 1994, Joseph N. Wilson.  All Rights Reserved.
  23.  
  24.    Permission to use, copy, and modify this software and its
  25.    documentation is hereby granted only under the following terms and
  26.    conditions.  Both the above copyright notice and this permission
  27.    notice must appear in all copies of the software, derivative works
  28.    or modified version, and both notices must appear in supporting
  29.    documentation.  Users of this software agree to the terms and
  30.    conditions set forth in this notice.
  31.  
  32.  */
  33.  
  34. #ifndef CLASS_H
  35. #define CLASS_H
  36.  
  37. #include "symbol.h"
  38. #include "object.h"
  39.  
  40. /* globals */
  41.  
  42.  
  43. void init_class_prims (void);
  44. void init_class_hierarchy (void);
  45. Object make_class (Object class_object, Object supers, Object slot_descriptors,
  46.            char *debug_name);
  47. void make_uninstantiable (Object class);
  48. void make_primary (Object class);
  49. Object make_instance (Object class, Object *initializers);
  50. Object make_singleton (Object val);
  51. Object make (Object class, Object rest);
  52. Object instance_p (Object obj, Object class);
  53. int instance (Object obj, Object class);
  54.  
  55. #define GENERIC_INSTANCE_P(obj, class)  (apply (eval(make_symbol("instance?")), listem (obj, class, NULL)))
  56. Object subtype_p (Object class1, Object class2);
  57. int subtype (Object class1, Object class2);
  58. Object objectclass (Object obj);
  59. Object singleton (Object val);
  60. Object direct_superclasses (Object class);
  61. Object direct_subclasses (Object class);
  62. Object same_class_p (Object class1, Object class2);
  63. Object eval_slots (Object slots);
  64. Object eval_slot (Object slot);
  65. Object eval_slot_key_values (Object slot_tail);
  66. Object find_getter_name (Object slot);
  67. Object seal (Object class);
  68. Object slot_descriptor_list (Object slots, int do_eval);
  69. void make_getter_setter_gfs (Object slotds);
  70.  
  71. #endif
  72.